package com.moneywelcome.investfacade;

import com.moneywelcome.investfacade.dto.*;
import com.moneywelcome.results.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.IOException;
import java.util.List;


@FeignClient(
        contextId="investInfoApi",//服务名字
        value = "invest" // 区分不同client
)
public interface InvestInfoApi {

    @GetMapping("/currentInfo")
    Result getCurrentInfo(@RequestParam("goldId") Integer goldId) throws IOException, ClassNotFoundException;
    @GetMapping("/productInfos")
    Result<List<GoldInfoDto>> getProductInfos();
    @GetMapping("/productInfoById")
    Result<GoldInfoDto> getProductInfo(@RequestParam("goldId") Integer goldId) throws IOException;
    @GetMapping("/subRule")
    Result<SubscribeRuleDto> getSubRule(@RequestParam("goldId") Integer goldId);
    @GetMapping("/redeemRule")
    Result<RedeemRuleDto> getRedeemRule(@RequestParam("goldId") Integer goldId);
    @GetMapping("/agreement")
    Result<GoldAgreemenDto> getAgreement(@RequestParam("goldId") Integer goldId);



}
